/* 现代化样式文件 V2 - 为WoniuNote应用提供美观现代的UI */
:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --danger-color: #e74c3c;
  --warning-color: #f39c12;
  --dark-color: #34495e;
  --light-color: #ecf0f1;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --card-radius: 8px;
  --transition: all 0.3s ease;
}

/* 基础样式 */
body {
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
  padding-bottom: 30px;
}

/* 现代化按钮样式 */
.btn {
  border-radius: 4px;
  font-weight: 500;
  padding: 8px 16px;
  transition: all 0.2s ease;
  text-transform: none;
  letter-spacing: 0.3px;
  margin-right: 5px;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 2px 5px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
  background-color: #2980b9;
  border-color: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(52, 152, 219, 0.4);
}

.btn-success {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  box-shadow: 0 2px 5px rgba(46, 204, 113, 0.3);
}

.btn-success:hover {
  background-color: #27ae60;
  border-color: #27ae60;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(46, 204, 113, 0.4);
}

.btn-danger {
  background-color: var(--danger-color);
  border-color: var(--danger-color);
  box-shadow: 0 2px 5px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
  background-color: #c0392b;
  border-color: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(231, 76, 60, 0.4);
}

/* 页面标题 */
.page-header {
  background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
  color: white;
  padding: 30px 0;
  margin-top: 0;
  margin-bottom: 30px;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background-image: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  opacity: 0.6;
  z-index: 0;
  pointer-events: none;
}

.page-header > div {
  position: relative;
  z-index: 1;
}

.page-header h2 {
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 28px;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.page-header p {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 0;
}

/* 卡片面板 */
.card-panel {
  background-color: white;
  border-radius: var(--card-radius);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  padding: 20px;
  margin-bottom: 20px;
  transition: var(--transition);
  border-top: 3px solid var(--primary-color);
}

.card-panel:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark-color);
  margin-top: 0;
  margin-bottom: 15px;
}

/* 分类卡片 */
.category-section {
  margin-bottom: 25px;
}

.category-section h4 {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid #eee;
  position: relative;
}

.category-section h4:after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--primary-color);
}

.category-card {
  background-color: white;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  height: 100%;
  margin-bottom: 15px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.category-card.active {
  border-left: 3px solid var(--primary-color);
  background-color: #f8f9fa;
}

.category-link {
  display: block;
  padding: 15px;
  color: var(--dark-color);
  text-decoration: none;
  transition: var(--transition);
}

.category-link:hover {
  text-decoration: none;
  color: var(--primary-color);
}

.category-link i {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--primary-color);
  display: block;
}

.category-name {
  display: block;
  font-weight: 500;
  margin-bottom: 5px;
}

.category-count {
  display: inline-block;
  background-color: #f1f1f1;
  color: #666;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 12px;
}

.delete-category {
  position: absolute;
  top: 5px;
  right: 5px;
  color: #ccc;
  transition: var(--transition);
}

.delete-category:hover {
  color: var(--danger-color);
}

/* 优先级分类卡片 */
.priority-card.priority-urgent {
  border-left: 3px solid var(--danger-color);
}

.priority-card.priority-urgent i {
  color: var(--danger-color);
}

.priority-card.priority-important {
  border-left: 3px solid var(--warning-color);
}

.priority-card.priority-important i {
  color: var(--warning-color);
}

.priority-card.priority-secondary {
  border-left: 3px solid var(--primary-color);
}

.priority-card.priority-secondary i {
  color: var(--primary-color);
}

.priority-card.priority-low {
  border-left: 3px solid #95a5a6;
}

.priority-card.priority-low i {
  color: #95a5a6;
}

.priority-card.priority-started {
  border-left: 3px solid var(--secondary-color);
}

.priority-card.priority-started i {
  color: var(--secondary-color);
}

/* 自定义分类 */
.custom-category-section {
  margin-bottom: 20px;
  border-radius: var(--card-radius);
  transition: var(--transition);
}

.custom-category-section h4 {
  color: var(--dark-color);
  border-bottom: 2px solid #eee;
  padding-bottom: 8px;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.custom-category-section h4:after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40%;
  height: 2px;
  background-color: var(--primary-color);
}

.custom-categories {
  margin-bottom: 20px;
}

.custom-category-item {
  position: relative;
  padding: 8px 10px;
  margin-bottom: 8px;
  background-color: white;
  border-radius: 4px;
  border-left: 3px solid #2ecc71;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.custom-category-item:hover {
  background-color: #f9f9f9;
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.custom-category-item.active {
  background-color: #f9f9f9;
  border-left: 3px solid var(--primary-color);
}

.custom-category-item .category-link {
  padding: 0;
  display: flex;
  align-items: center;
  flex: 1;
}

.custom-category-item .category-link i {
  font-size: 14px;
  margin-right: 10px;
  margin-bottom: 0;
  display: inline-block;
}

.custom-category-item .category-count {
  margin-left: auto;
}

.custom-category-item .delete-category {
  position: relative;
  top: auto;
  right: auto;
  margin-left: 8px;
}

.add-category-form {
  margin-top: 15px;
}

/* 重要清单区域样式 */
.important-cards-section {
  margin-bottom: 20px;
}

.important-cards-section h4 {
  color: var(--dark-color);
  border-bottom: 2px solid #eee;
  padding-bottom: 8px;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.important-cards-section h4:after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40%;
  height: 2px;
  background-color: #f39c12;
}

/* 特殊清单项样式 */
.priority-item .category-link i {
  color: #e74c3c;
}

.progress-item .category-link i {
  color: #27ae60;
}

.completed-item .category-link i {
  color: #3498db;
}

.priority-item:hover {
  background-color: rgba(231, 76, 60, 0.1);
}

.progress-item:hover {
  background-color: rgba(39, 174, 96, 0.1);
}

.completed-item:hover {
  background-color: rgba(52, 152, 219, 0.1);
}

/* 卡片列表样式 */
.card-list {
  margin-top: 20px;
}

.card-list-item {
  background-color: white;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  margin-bottom: 15px;
  padding: 15px;
  border-left: 4px solid var(--primary-color);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card-list-item:hover {
  transform: translateX(3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 装饰性背景效果 */
.card-list-item::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle at top right, rgba(52, 152, 219, 0.05) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.card-list-item.priority-1 {
  border-left-color: #e74c3c;
}

.card-list-item.priority-2 {
  border-left-color: #f39c12;
}

.card-list-item.priority-3 {
  border-left-color: #3498db;
}

.card-list-item.priority-4 {
  border-left-color: #95a5a6;
}

.card-title {
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 10px;
}

.card-title.completed {
  color: #95a5a6;
}

.card-meta {
  color: #7f8c8d;
  font-size: 12px;
}

.card-meta span {
  margin-right: 15px;
  display: inline-block;
}

.card-actions {
  margin-top: 10px;
}

.action-link {
  display: inline-block;
  color: var(--primary-color);
  margin-left: 10px;
  transition: var(--transition);
}

.action-link:hover {
  color: #2980b9;
  text-decoration: none;
}

.action-link.success {
  color: var(--secondary-color);
}

.action-link.success:hover {
  color: #27ae60;
}

.action-link.danger {
  color: var(--danger-color);
}

.action-link.danger:hover {
  color: #c0392b;
}

.card-progress {
  margin-bottom: 10px;
}

.progress-container {
  width: 100%;
  max-width: 300px;
  margin-left: auto;
}

.progress {
  height: 6px;
  margin-bottom: 0;
  border-radius: 3px;
  background-color: #ecf0f1;
  box-shadow: none;
}

.progress-bar {
  background-color: var(--primary-color);
  border-radius: 3px;
}

/* 状态标签 */
.status-badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 3px;
  margin-right: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.not-started {
  background-color: #f1f1f1;
  color: #7f8c8d;
}

.status-badge.in-progress {
  background-color: rgba(52, 152, 219, 0.2);
  color: #2980b9;
}

.status-badge.completed {
  background-color: rgba(46, 204, 113, 0.2);
  color: #27ae60;
}

/* 辅助类 */
.section-divider {
  height: 1px;
  background-color: #eee;
  margin: 30px 0;
}

.spacer-20 {
  height: 20px;
}

.spacer-10 {
  height: 10px;
}

.mb-2 {
  margin-bottom: 10px;
}

/* Flexbox 布局辅助类 */
.d-flex {
  display: flex !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.align-items-center {
  align-items: center !important;
}

.text-right {
  text-align: right !important;
}

.mb-3 {
  margin-bottom: 15px !important;
}

.badge-primary {
  background-color: var(--primary-color);
  color: white;
}

/* 自定义分隔线 */
.custom-divider {
  height: 1px;
  background-color: #e1e1e1;
  margin: 25px 0;
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { transform: translateX(-10px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0px); }
}

.card-panel,
.category-card,
.custom-category-item,
.card-list-item {
  animation: fadeIn 0.3s ease-out;
}

.card-title,
.page-header h2 {
  animation: slideIn 0.4s ease-out;
}

/* 按钮悬停效果 */
.btn-primary:hover,
.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
}

/* 添加悬停交互效果 */
.action-link:hover i {
  animation: pulse 0.5s infinite;
}

/* 改进卡片外观 */
.shadow-sm {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.shadow-hover:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s ease;
}

/* 水波纹效果 */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple:after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10,10);
  opacity: 0;
  transition: transform .5s, opacity 1s;
}

.ripple:active:after {
  transform: scale(0,0);
  opacity: .3;
  transition: 0s;
}

/* 按钮交互增强 */
.btn {
  position: relative;
  overflow: hidden;
}

.btn.btn-primary,
.btn.btn-success,
.btn.btn-danger {
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.16);
  transition: all 0.2s ease;
}

.btn.btn-primary:hover,
.btn.btn-success:hover,
.btn.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn.btn-primary:active,
.btn.btn-success:active,
.btn.btn-danger:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* 浮动图标效果 */
.custom-category-item .category-link i,
.card-actions a i {
  animation: float 3s ease-in-out infinite;
}

/* 为编辑器添加样式 */
.edui-default {
  border-radius: var(--card-radius) !important;
  box-shadow: var(--shadow) !important;
  border: 1px solid #eee !important;
}

/* 表单美化 */
.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
  transition: all 0.2s ease;
}

/* 选择框美化 */
select.form-control {
  background-image: linear-gradient(45deg, transparent 50%, #aaa 50%), linear-gradient(135deg, #aaa 50%, transparent 50%);
  background-position: calc(100% - 20px) center, calc(100% - 15px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* 搜索框和输入框动画效果 */
.form-control {
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

/* 表格增强 */
.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table > thead > tr > th {
  border-bottom: 2px solid var(--primary-color);
  background-color: #f8f9fa;
  transition: background-color 0.2s;
  padding: 12px 8px;
}

.table > tbody > tr {
  transition: all 0.2s;
}

.table > tbody > tr:hover {
  background-color: #f0f7fc !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.table > tbody > tr:nth-child(odd) {
  background-color: #f9f9f9;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .btn {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .page-header {
    padding: 20px 0;
  }
  
  .card-panel {
    padding: 15px;
  }
  
  .card-meta span {
    display: block;
    margin-bottom: 5px;
  }
  
  .card-actions {
    text-align: left;
    margin-top: 15px;
  }
  
  .action-link {
    margin-left: 0;
    margin-right: 10px;
  }
}
